


<style>

    .setcolor{background-color: #d1ffc8}
</style>



<div class="admin-biaogelist">

    <div class="listbiaoti am-cf">
        <ul class="am-icon-flag on"> 拼多多已完成任务</ul>


        <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">拼多多已完成任务</a></dl>

        <!--<dl>
          <button type="button" class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus" > 补充线订单</button>
        </dl>-->
        <!--这里打开的是新页面-->

    </div>

    <div class="fbneirong">
        <div class="soso" style="margin-left: 10%">

            <p>
                日期选择
                <input type="" id="datetimepicker" name="date" class="date_picker" data-date-format="yyyy-mm-dd">
            </p>
            <p class="ycfg" style="margin-left: 60px;"><input type="text" name="shop_name" class="am-form-field am-input-sm" placeholder="商铺名" /></p>
            <p class="ycfg" style="margin-left: 60px;"><input type="text" name="orderid" class="am-form-field am-input-sm" placeholder="订单号" /></p>
            <p class="ycfg" style="margin-left: 60px;"><input type="text" name="awz" class="am-form-field am-input-sm" placeholder="awz" /></p>
            <p class="" > <div   style="margin-left: 20px;" class="am-btn am-btn-secondary am-radius search">查找</div></p>
            <p class="" > <a   style="margin-left: 20px;" class="am-btn am-btn-secondary am-radius excelout"  href="<?php echo base_url()."/Hunter/finishlistexcel/2/0"?>">导出当天记录</a></p>
        </div>

        <form class="am-form am-g">
            <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped am-table-hover">
                <thead>
                <tr class="am-success">
                    <th class="table-check"><input type="checkbox" /></th>

                    <th class="table-id">编号</th>
                    <th class="table-title">处理时间</th>
                    <th class="table-type">店铺名称</th>
                    <th class="table-type">每单件数</th>
                    <th class="table-type">关键字</th>

                    <th class="table-author am-hide-sm-only">录入价格</th>
                    <th class="table-date am-hide-sm-only" style="width: 400px;">订单号</th>
                    <th class="table-type">付款价格(总额)</th>
                <!--    <th class="table-type">付款总额</th>-->
                    <th class="table-date am-hide-sm-only">awz标示</th>
                    <th class="table-date am-hide-sm-only">操作</th>
                </tr>
                </thead>
                <tbody class="impowdith">





                </tbody>
            </table>

            <!--  <div class="am-btn-group am-btn-group-xs">
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 删除</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 上架</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 下架</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 移动</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 移动</button>
                  <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
              </div>-->



            <div id="Pagination" style="margin:20px auto" style="display:none"></div>

            <!--  <ul class="am-pagination am-fr">


              </ul>-->




            <hr />

        </form>



    </div>



    <script>







        var on_request=false;
        var type=1;
        var page=1;

   $(".search").click(function () { page=1;
            getjdfinishlist()
        });



        function setlisthtnml(data) {
            var html="";
            /*  <a class="am-btn am-btn-default am-btn-xs am-text-success am-round am-icon-file" data-am-modal="{target: '#my-popups'}" title="添加子栏目"></a>*/

            if(data.list.length>0){
                $.each(data.list, function (key, value) {
                     var setcolor="";
                    if(value.update!=null){
                        setcolor="setcolor";
                    }
                    html=html+
                        '<tr  listid="'+value.id+'"   ><td><input type="checkbox" /></td>\n'+
                        '<td>'+value.id+'</td>\n'+
                        '<td>'+value.finishtime+'</td>\n'+
                        '<td>'+value.shop_name+'</td>\n'+
                        '<td>'+value.number+'</td>\n'+
                        '<td>'+value.key_word+'</td>\n'+
                        '<td>'+value.price+'</td>\n'+
                        '   <td > <input name="orderid"   value="'+value.orderid+'"  class="'+setcolor+'"    style="width: 100%" ></td>'+
                        '   <td > <input name="real_price"   value="'+value.real_price+'"  style="width: 40%; margin-left: 10px;" ></td>'+
                        '   <td > <input name="awz"   value="'+value.awz+'"  style="width: 40%; margin-left: 10px;" ></td>'+
                      /*  '<td>'+value.awz+'</td>\n'+*/
                        '<td>'+'<div  class="am-btn am-btn-secondary edite">修改</div>'+'</td>\n'+

                        '</tr>';
                });
                $(".impowdith").html(html);
                $('#Pagination').show();

                edite();


            }else{
                html += '<li><div style="width:100%;text-align:center;">&nbsp暂无数据</div></li>';
                $(".impowdith").html(html);
                $('#Pagination').hide();
            }
        }



        function edite(){
            $(".edite").click(function () {
               if( on_request){
                    alert("请不要频繁操作"); return;
                }
                var id=$(this).parents("tr").attr("listid");
                var orderid=$(this).parents("tr").find("input[name='orderid']").val();
                var real_price=$(this).parents("tr").find("input[name='real_price']").val();
                var awz=$(this).parents("tr").find("input[name='awz']").val();




               var r=confirm("确认修改该记录?");
                 if(!r){
                       return;
                   }
                var url = "<?php echo base_url(); ?>/hunter/JdEdite";
                var postdata = {
                    'id': id,
                    'orderid': orderid,
                    'awz': awz,
                    'real_price': real_price
                };
                 on_request=true;
                $.post(url, postdata, function (data) {
                      on_request = false;
                    if(data.code==0){
                        alert("修改成功"); return;
                    }
                    alert(data.msg);
                },'json');


            });
        }








        getjdfinishlist();
        function getjdfinishlist() {
            var url = "<?php echo base_url(); ?>/hunter/getpddfinishlist";
            var orderid=$("input[name='orderid']").val();
            var date=$("input[name='date']").val();
            var awz=$("input[name='awz']").val();
            var shop_name=$("input[name='shop_name']").val();

            var postdata = {
                'page': page,
                'orderid': orderid,
                'awz': awz,
                'shop_name': shop_name,
                'date': date,
                'epage': 10
            };
            $.post(url, postdata, function (data) {
                setlisthtnml(data);
                setPagination("Pagination", data.count, page, data.epage, function (clickPage) {
                    page = parseInt(clickPage) + 1;
                    getjdfinishlist();
                });
            },'json');

        }





    </script>



    <div class="am-popup am-popup-inner" id="my-popups">
        <div class="am-popup-hd">
            <h4 class="am-popup-title">修改栏目名称</h4>
            <span data-am-modal-close class="am-close">&times;</span> </div>
        <div class="am-popup-bd">
            <form class="am-form tjlanmu">
                <div class="am-form-group">
                    <div class="zuo">栏目名称：</div>
                    <div class="you">
                        <input type="email" class="am-input-sm" id="doc-ipt-email-1" placeholder="请输入标题">
                    </div>
                </div>
                <div class="am-form-group">
                    <div class="zuo">栏目关键词：</div>
                    <div class="you">
                        <input type="password" class="am-input-sm" id="doc-ipt-pwd-1" placeholder="请输入关键词">
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">栏目描述：</div>
                    <div class="you">
                        <textarea class="" rows="2" id="doc-ta-1"></textarea>
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">栏目图片：</div>
                    <div class="you" style="height: 45px;">
                        <input type="file" id="doc-ipt-file-1">
                        <p class="am-form-help">请选择要上传的文件...</p>
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">简介：</div>
                    <div class="you">
                        <textarea class="" rows="2" id="doc-ta-1"></textarea>
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="zuo">状态：</div>
                    <div class="you" style="margin-top: 3px;">
                        <label class="am-checkbox-inline">
                            <input type="checkbox" value="option1">
                            显示 </label>
                        <label class="am-checkbox-inline">
                            <input type="checkbox" value="option2">
                            隐藏 </label>
                    </div>
                </div>
                <div class="am-form-group am-cf">
                    <div class="you">
                        <p>
                            <button type="submit" class="am-btn am-btn-success am-radius">提交</button>
                        </p>
                    </div>
                </div>
            </form>
        </div>
    </div>






    <div class="foods">
        <ul>
            版权所有@2015.
        </ul>
        <dl>
            <a href="" title="返回头部" class="am-icon-btn am-icon-arrow-up"></a>
        </dl>
    </div>




</div>

</div>




</div>


<!--<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>-->
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/polyfill/rem.min.js"></script>
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/polyfill/respond.min.js"></script>
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/amazeui.legacy.js"></script>


<!--[if (gte IE 9)|!(IE)]><!-->
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/amazeui.min.js"></script>
<!--<![endif]-->



</body>
</html>